<template>
    <div>
          <!-- #ifdef MP-WEIXIN || APP-PLUS -->
        <div class="wechatuser">
            <img :src="imgUrl"/>
            <div class="wechat-right">
                <h3>微信公众号：<span class="title">{{name}}</span><span @click="copy" class="btn">点击复制</span></h3>
                <p>专享服务，产品咨询、折扣活动、售后查询</p>
            </div>
        </div>
         <!-- #endif -->
    </div>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		props:{
			name:{
				type:String,
				default:''
			},
			imgUrl:{
				type:String,
				default:''
			}
		},
		methods:{
			copy(){
				uni.setClipboardData({
				    data: this.name,
				    success: function () {
				       uni.showToast({
				       	title:'复制成功',
						icon:'success'
				       })
				    }
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.wechatuser{
		width:710rpx;
		margin:20rpx auto;
		display: flex;
		justify-content: space-between;
		img{
			width:120rpx;
			height:120rpx;
		}
		.wechat-right{
			width:560rpx;
			background: #94d674;
			padding:10rpx;
			border-radius: 8rpx;
			h3{
				font-size:28rpx;
				color:#343434;
				.title{
					font-weight:bold;
				}
				.btn{
					display: inline-block;
					background: #58971b;
					color:#fff;
					margin-left:10rpx;
					font-size:24rpx;
					padding:4rpx 8rpx;
					border-radius: 8rpx;
				}
			}
			p{
				font-size:28rpx;
				margin-top:10rpx;
			}
		}
	}
</style>
